﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

using CSF.Customers.Data;
using CSF.Customers.BLL;
using CSF.Customers.Service;

namespace CSF.Service.Accounts
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码、svc 和配置文件中的类名“CustomerContactSvc”。
    public class CustomerContactSvc : ICustomerContactSvc
    {

        #region IDataIdKeyService<CustomerContact> 成员

        public CustomerContact GetOneById(int id)
        {
            CustomerContactBLL bll = new CustomerContactBLL();
            return bll.GetOneById(id);
        }

        public bool UpdateById(CustomerContact t, int id)
        {
            CustomerContactBLL bll = new CustomerContactBLL();
            return bll.UpdateById(t, id);
        }

        public bool DeleteOneById(int id)
        {
            CustomerContactBLL bll = new CustomerContactBLL();
            return bll.DeleteOneById(id);
        }

        #endregion

        #region IDataEntityService<CustomerContact> 成员

        public List<CustomerContact> GetAll()
        {
            CustomerContactBLL bll = new CustomerContactBLL();
            return bll.GetAll();
        }

        public int Insert(CustomerContact entity)
        {
            CustomerContactBLL bll = new CustomerContactBLL();
             bll.Insert(entity);
             return entity.Id;
        }

        #endregion

        #region IDataIdKeyService<CustomerContact> 成员


        public int DeleteById(IEnumerable<int> ids)
        {
            CustomerContactBLL bll = new CustomerContactBLL();
            return bll.DeleteById(ids);
        }

        #endregion
    }
}
